﻿using System;
using Framework.Poco;
using Shell.DomainDot;

namespace Framework.Domain
{
    /// <summary>
    /// 文章删除器
    /// </summary>
    public class DeleteArticle : DomainDotBase<Category>
    {
        /// <summary>
        /// 指定分类的文章
        /// </summary>
        public WithMany<Article> Article { get; set; }

        /// <summary>
        /// 删除文章
        /// </summary>
        public void Delete(Guid identity)
        {
            this.Article.Delete(identity);
            this.Article.Submit();
        }
    }
}
